//将抽象语法树转换render函数
import { generate } from './generate';
function compilerToRenderFuntion(html,vm) {
  const ast = parseHtmlToAst(html);
  const code = generate(ast,vm);
  const render = new Function(
      `with(this){return ${code}}`
    )
  return render;
}
function parseHtmlToAst(html) { return html };
export { compilerToRenderFuntion }